import requests

if __name__ == '__main__':
    data = {"delete": {"id":"row999"}}
    #data = {"delete": {"query":"QUERY"}}
    params = {"boost": 1.0, "overwrite": "true", "commitWithin": 1000}
    url = 'http://CDH-master:8983/solr/hbaseSolr/update?wt=json'
    headers = {"Content-Type": "application/json"}
    r = requests.post(url, json=data, params=params, headers=headers)
    print(r.url)
    print(r.status_code)
    if (r.status_code == 200):
        print("删除成功！")
